<?php
class DownloadController extends AuthController{
	
	protected function getAuth(){
		if(isset($this->user))
			return true;
		return false;
	}
	
	public function actionIndex(){
		$mDownloads = new Mapper_Downloads($this->getDb());
		if($mDownloads->hasDownloads($this->user))
			$this->downloads = $mDownloads->getByUser($this->user);
		else
			die(header("location: /default/download/badrequest"));
	}
	
	public function actionDownload(){
		
		die(header("location: /default/download/badrequest"));
	}
	
	public function actionBadrequest(){
		
	}
}